Edit the command line path for an executable on OSX [closed]

Posted by Stu on Super User See other posts from Super User or by Stu
Published on 2012-09-03T13:38:07Z Indexed on 2012/09/27 9:40 UTC
Read the original article Hit count: 339

Filed under:
|
|
|
|

Possible Duplicate:
What are PATH and other environment variables, and how can I set or use them?

I have the default package of Ruby installed that shipped with the OS, which is an older version.

I have recently installed MacPorts with the latest Ruby version which is installed in a seperate location:-

/opt/local/bin/

But when I run

which ruby

I get

/usr/bin/ruby

Is there any way to edit the path of the command ruby so it would reference the new installation in the /opt/ directory?

Thanks in advance.

© Super User or respective owner

Related posts about osx

Related posts about bash